home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Die Speccy' 97
/
Die Speccy' 97.iso
/
amiga_system
/
the_aminet
/
comm
/
uucp
/
aminetutils.lzh
/
AmiNet
/
AmiNetUpdate.rexx
< prev
Wrap
OS/2 REXX Batch file
|
1995-10-22
|
2KB
|
71 lines
/* This script will attempt to get the most recent AmiNet index file
** then process it automaticaly.
**
** You can safely call this program once each night. It there is nothing
** for it to do, it will quickly exit. This insures your AmiNet filesare
** as up to date as posible.
**
**
** SENDMAIL, UNCOMPRESS, and UUBREAK must be in the normal search path.
**
**
** The assumption is made that you have placed all your files in the
** directory DOORS:AMINET/ as originaly suggested. If you have moved them,
** please change the variables below as needed.
**
**
** If your system can't receive 1meg UUENCODED messages in a single block,
** you will need to update the index manualy. This program won't work on
** broken up files.
*/
options results
WorkDir = 'Doors:AmiNet/'
uumail = 'uumail:'
fakename= 'AmiNet'
/*--------------------< CHANGE NOTHING BEYOND THIS POINT >----------------*/
updatefile=WorkDir'Update.txt'
AmiNetBreak=WorkDir'AmiNetBreak'
fakeuser=uumail||fakename
tempdir=uumail'AmiNet-TempDir'
update='??/??/??'
if exists(fakeuser) then do
shell command 'makedir <>NIL: 'tempdir
pragma('D',tempdir)
shell command 'uubreak 'fakeuser
shell command 'uncompress 'tempdir'/INDEX.Z'
shell command AmiNetBreak' 'WorkDir' 'TempDir'/INDEX'
pragma('D',WorkDir)
shell command 'Delete <>NIL: 'tempdir' all'
shell command 'Delete <>NIL: 'fakeuser
end
if open(infile,updatefile,'r') then do
update=strip(upper(readln(infile)))
close(infile)
end
dt=upper(word(date(),2)' 'right(date(),2))
dt2=word(date(),1)+2
if dt~=update & (dt2/3=trunc(dt2/3)) then do
if open(outfile,'t:AmiNetRequest','w') then do
writeln(outfile,'To: bitftp@pucc.princeton.edu')
writeln(outfile,'Subject: FTP Request')
writeln(outfile,'')
writeln(outfile,"ftp ftp.wustl.edu uuencoded")
writeln(outfile,'user anonymous')
writeln(outfile,'chunksize 0')
writeln(outfile,'cd /pub/aminet')
writeln(outfile,'get INDEX.Z')
close(outfile)
shell command 'sendmail <t:AmiNetRequest -f 'fakename
shell command 'delete <>NIL: t:AmiNetRequest'
end
end